#include"Stack.cpp"
#include<math.h>
#include"Assembler.cpp"
#include"List.cpp"
#include"stdio.h"
//#include<io.h>

#ifndef COM_INCLUDED
#define COM_INCLUDED
enum COMMANDS{
    PUSH = -10014,
    POP = -10013,
    MOV = -10012,
    ADD = -10011,
    SUB = -10010,
    MUL = -10009,
    DIVI = -10008,
    DUB = -10007,
    JB = -10006,
    JA = -10005,
    JE = -10004,
    QUIT = -10003,
    SQRTI = -10002,
    SKIP = -10001,
    CALL = -10000,
    FUNC = -9999,
    CALLA = -9998
    };
#endif

#ifndef REG_INCLUDED
#define REF_INCLUDED
enum REGISTERS{AX, BX, CX, DX};
#endif
enum CPUERR{};
struct CPU
{
    struct program* prgr;
    struct stack_t stk;
};
program* CPU_assemble(FILE* f);
int CPU_run (struct program* prgr);
int CPU_push(struct CPU* cpu, int curCom);
int CPU_pop (FILE* f_out, struct CPU* cpu, int value);
